import java.io.*;
import java.util.*;

public class Main
{
    static final double Border = 4.0 / Math.PI;
    static Random rnd = new Random();
    private static double f0(double x)
    {
	return 2.0 / (Math.PI * Math.sqrt(1.0 - x * x));
    }
    private static double g(double y)
    {
	return 4.0 / (Math.PI * Math.sqrt(2.0 - y * y));
    }
    public static void main(String []args)
    {

	try
	{
	    Scanner in  = new Scanner(System.in);
	    int N = in.nextInt();
	    double Excl[] = new double [N];
	    int count = 0;
	    while (count < N - 1)
	    {
		double x = rnd.nextDouble(),
			y = rnd.nextDouble() * Border;
		if (y <= g(x))
		{
		    Excl[count++] = 1 - x * x;
		}
	    }
	    double e_exp = 2* Math.pow(Math.PI, -1.0), d = 0;
	    double e = 0;
	    for (double x: Excl)
		e += x;
	    e /= N;
	    System.out.println(e + "\t" + e_exp);



	}
	catch(Throwable e){System.out.println(e.getMessage());}
    }
}